<?php
/**
 * File:        autoload.php
 * 自动加载类
 *
 * @author      Xia Lijun   /   Liu Rui
 * @date        2019年7月29日14:33:48
 * @version     V1.0
 */

// 加载公共配置
include_once(BASEPATH . '/conf/conf.php');
// 加载路由信息
include_once(BASEPATH . '/conf/route.php');

// 加载公共库
include_once(BASEPATH . '/lib/myException.php');
include_once(BASEPATH . '/lib/utils.php');
include_once(BASEPATH . '/lib/registerUtils.php');
include_once(BASEPATH . '/lib/pgUtils.php');

// 加载控制器
include_once(BASEPATH . '/bus/controller/testController.php');
include_once(BASEPATH . '/bus/controller/indexController.php');

// 加载模型
include_once(BASEPATH . '/bus/model/testModel.php');

/**
 * 系统执行前的一些过滤配置
 */

error_reporting(PUBLIC_CONFIGS['ERROR_DEBUG']);

// 对象上树
RegisterUtils::set('TestC', new TestController());
RegisterUtils::set('IndexC', new IndexController());
RegisterUtils::set('TestM', new TestModel());

// rid 方法调用
define(
    'ROUTE',
    [
        'getIndexInfo' => ['controller' => 'IndexC', 'act' => 'getIndexInfo'],
        'getTestInfo' => ['controller' => 'TestC', 'act' => 'getTestInfo'],
        'getDbConfig' => ['controller' => 'TestC', 'act' => 'getDbConfig'],
        'test' => ['controller' => 'TestC', 'act' => 'test'],
        'test2' => ['controller' => 'TestC', 'act' => 'test2'],
        'test3' => ['controller' => 'TestC', 'act' => 'test3'],
        
    ]
);
